{% if view.search_url_para %}
<form action="{% url view.search_url view.search_url_para %}" method="GET">
{% else %}
<form action="{% url view.search_url %}" method="GET">
{% endif %}
  <div class="input-group">
      <input type="text" class="input-sm form-control" placeholder="Search" name="q"
        {% if q %}
          value="{{ q }}"
        {% endif %}>
      <span class="input-group-btn">
        <button class="btn btn-sm btn-default" type="submit">Go!</button>
      </span>
  </div>
</form>